package com.example.template;

public abstract class AbstractSwordsman {
    public final void fighting(){
        neigong();
        meridian();
        if(hasWeapons()){
            weapons();
        }
        moves();
        hook();
    }

    protected void hook() {}
    protected abstract void neigong();
    protected abstract void weapons();
    protected abstract void moves();
    protected void meridian() {
       System.out.println("开启正经和奇经");
    }
    protected boolean hasWeapons() {
        return true;
    }
}
